<?php
namespace app\serverfund\model;

use \app\manage\model\BaseModel;

/**
 * 资金日志帐户的模型层
 * @author adv30 <adv30@126.com> 2017年6月19日14:54:53
 */
class FundOptionLog extends BaseModel
{
    protected $name = 'fund_option_log';
    protected $connection = 'db_config_fund';
    protected $dateFormat = 'Y-m-d H:i:s';
    protected $append = ['status_text','type_text'];
    protected $typeText = ['init'=>'初始化', 'prepaid'=>'系统充值', 'transfer'=>'转账', 'payment'=>'支付', 'borrow'=>'借款', 'refund'=>'还款', 'freeze'=>'冻结', 'unfreeze'=>'解冻','system'=>'系统'];

    public function getTypeTextAttr($value, $data)
    {
    	return $this->typeText[$data['type']];
    }

    public function getUserInfoAttr($value)
    {
        return json_decode($value, true);
    }
   
    public function getOppositeInfoAttr($value)
    {
        return json_decode($value, true);
    }


}
